import VueRouter from 'vue-router'
const routes = [
    {
        path: '/',
        component: () => import("@/pages/home"),
    },
    {
        path: '/search/:type/:theme?',
        component: () => import("@/pages/search"),
    },
    {
        path: '/detail/:id',
        component: () => import("@/pages/detail"),
    },
    {
        path: '/data/:id',
        component: () => import("@/pages/data"),
    },
    {
        path: '/aboutUs',
        component: () => import("@/pages/aboutUs"),
    },
]

const router = new VueRouter({
    routes,
})

router.afterEach(() => {
    window.scrollTo(0, 0)
})

export default router
